<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>找回密码</title>
<link type="text/css" href="${staticResources}/css/sendemailver.css" rel="stylesheet" />
<script type="text/javascript" src="${staticResources}/js/ajax.js"></script>

<script type="text/javascript">
function restorepwd()
{
	var realname = document.getElementById("realname").value;
	var idnumber = document.getElementById("idnumber").value;
	var action="start";
	var mode = "ajax";
	
	var params="realname=" + encodeURIComponent(realname);
	params+="&idnumber="+encodeURIComponent(idnumber);
	params+="&action="+encodeURIComponent(action);
	params+="&mode="+encodeURIComponent(mode);
	
	var checkid=document.getElementById("checkid");
	
	
	if(realname.length == 0) {
		checkid.innerHTML="<font color='red'> 姓名不能为空！</font>";
		return;
	}
	if(idnumber.length == 0) {
		checkid.innerHTML="<font color='red'> 身份证号不能为空！</font>";
		return;
	}
	
	doAjax("RestorePassword"
			,params,function(rst){
	var rst=eval('(' +rst+ ')');
	if(rst.status == 0)
	{
		location.href=rst.redirectURL;
	}
	else 
	{
		window.alert(rst.message);
	} 
	});
}
</script>	
</head>
<body>
<div id="divmain" style=" background: url('${staticResources}/image/background.jpg');">
  <form method="post" name="frmLogin" action="RestorePassword" onsubmit="restorepwd();return false;">
  <div id="divmessage">
    <label id="labelmessage">找回密码</label>
    <div id="divmessage_xq">
        <table id="tableform">
          <tr>
          <td class="tdtext"> 姓名：</td>
          <td class="tdinput"> <input type="text" name="realname" id="realname"> </td>
          </tr>
        <tr height=10px></tr>
         <tr>
          <td class="tdtext"> 身份证：</td>
          <td class="tdinput"> <input type="text" name="idnumber" id="idnumber"> </td>
          </tr>
        <tr height=10px></tr>
       </table>
      <div id="checkid"></div>
    </div>
  </div>
  <div id="divbottom">
    <input type="image" src="${staticResources}/image/submit.jpg" width="140" height="40" class="button"/>
  </div>
  <input type="hidden" name="action" value="start" />
  </form>
</div>
</body>
</html>